<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Accueil Mdoc Tah Les Oufs !</title>
    <link rel="stylesheet" href="scripts/login/css/style.css" />
    <script src="scripts/jquery/js/jquery-1.6.2.min.js"></script>
    <script src="scripts/jquery/js/jquery-ui-1.8.16.custom.min.js"></script>
    <link rel="stylesheet" href="scripts/customInput.css" />
    <script src="scripts/customInput.jquery.js"></script>
    <script src="scripts/login/js/login.js"></script>
    
    <link rel="stylesheet" href="scripts/jquery/css/ui-darkness/jquery-ui-1.8.16.custom.css" />
    

<script type="text/javascript">
$(document).ready(function(){
    var button = $('#logoutButton');
    var form = $('#logoutForm');
    
    button.click(function(){
    	if(confirm('Are you sure you want to logout?'))
    		form.submit();
    	else
    		return;
    });
    
    $('input:submit').button();
    $('input').customInput();
});
</script>
</head>
<body>
<%
//is the user allowed to be here?
if(!fr.upmc.utils.SessionTracker.isUserConnected(request))
{
	fr.upmc.utils.SessionTracker.redirectToHome(response);
	return;
}
%>
<div id="bar">
        <div id="container">
            <!-- Login Starts Here -->
            <div id="title">MDOC Project</div>
            <div id="loginContainer">
                <a href="#" id="logoutButton"><span>Log out</span></a>
                <div style="clear:both"></div>
                <div id="loginBox">                
                    <form id="logoutForm" action="authentification.do" method="post">
                        <fieldset id="body">
                            <input type="hidden" name="action" value="logout">
                            <input type="submit" id="logout" value="Sign out" />
                        </fieldset>
                    </form>
                </div>
            </div>
            <!-- Login Ends Here -->
		</div>
	</div>
	<div class="container">
	<br/>
	<form name="auth" action="dispatcherOption.do" method="get">
		<fieldset class="fieldsetClass">
		<legend>Choose an action:</legend>
		
			<input type="radio" name="opinions" id="radio-1" value="addContact"/>
			<label for="radio-1">Add a new contact</label>
			
			<input type="radio" name="opinions" id="radio-2" value="deleteContact" />
			<label for="radio-2">Delete an existing contact</label>
			
			<input type="radio" name="opinions" id="radio-3" value="updateContact" />
			<label for="radio-3">Update a contact</label>
			
			<input type="radio" name="opinions" id="radio-4" value="searchContact" />
			<label for="radio-4">Search for contacts</label>
			
			<input type="radio" name="opinions" id="radio-5" value="listContacts" checked="checked"/>
			<label for="radio-5">List all contacts</label>
		</fieldset>
		<input type="submit" name="Validate" />
	</form>

</div>
</body>
</html>